package com.xpj.simulate;

import java.util.concurrent.ConcurrentHashMap;

public class ProductDatabase {

    public static final ConcurrentHashMap<String, Product> database = new ConcurrentHashMap<>();

    static {
        //模拟数据库
        database.put("a1", new Product().setId("a1").setName("冰箱").setDetail("好冰箱"));
        database.put("b1", new Product().setId("b1").setName("电视").setDetail("好电视"));
        database.put("c1", new Product().setId("c1").setName("洗衣机").setDetail("好洗衣机"));
        database.put("d1", new Product().setId("d1").setName("电脑").setDetail("好电脑"));
    }
}
